home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / a86b.arc / INSTR.DOC < prev    next >
Encoding:
Text File  |  1986-08-13  |  24.1 KB  |  385 lines

  1. ---INSTR.DOC---
  2.  
  3. The 86 Instruction Set
  4.  
  5. The chart below summarizes the machine instructions you can program with A86.
  6. In order to use the chart, you need to learn the meanings of the specifiers
  7. (each given by 2 lower-case letters), that follow most of the instruction
  8. mnemonics.  Each specifier indicates the type of operand (register byte,
  9. immediate word, etc.) that follows the mnemonic to produce the given opcodes.
  10.  
  11. "c" means the operand is a code label, pointing to a part of the program to
  12.     be jumped to or called.  A86 will also accept a constant offset in this
  13.     place (or a constant segment-offset pair in the case of "cd").  "cb"
  14.     is a label within about 128 bytes (in either direction) of the current
  15.     location.  "cw" is a label within the same code segment as this program;
  16.     "cd" is a pair of constants separated by a colon-- the segment value
  17.     to the left of the colon, and the offset to the right.  Note that in
  18.     both the cb and cw cases, the object code generated is the offset from
  19.     the location following the current instruction, not the absolute location
  20.     of the label operand.  In some Z-80 assemblers, you have to code this
  21.     offset explicitly by putting "$-" before every relative jump operand in
  22.     your source code.  You do NOT need to, and should not do so with A86.
  23.  
  24. "e" means the operand is an Effective Address.  The concept of an Effective
  25.     Address is central to the 86 machine architecture, and thus to 86
  26.     assembly language programming.  It is described in detail in the
  27.     file EFFADDR.DOC.  We summarize here by saying that an Effective
  28.     Address is either a general-purpose register, a memory variable, or
  29.     an indexed memory quantity.  For example, the instruction "ADD rb,eb"
  30.     includes the instructions: ADD AL,BL, or ADD CH,BYTEVAR, or ADD DL,B[BX+17].
  31.  
  32. "i" means the operand is an immediate constant, provided as part of the
  33.     instruction itself.  "ib" is a byte-sized constant; "iw" is a constant
  34.     occupying a full 16-bit word.  The operand can also be a label, defined
  35.     with a colon.  In that case, the immediate constant which is the location
  36.     of the label is used.  Examples:  "MOV rw,iw" includes the instructions:
  37.     MOV AX,17, or MOV SI,VAR_ARRAY, where "VAR_ARRAY:" appears somewhere in
  38.     the program, defined with a colon.  NOTE that if VAR_ARRAY were defined
  39.     without a colon, e.g., "VAR_ARRAY DW 1,2,3", then "MOV SI,VAR_ARRAY" would
  40.     be a "MOV rw,ew" NOT a "MOV rw,iw".  The MOV would move the contents of
  41.     memory at VAR_ARRAY (in this case 1) into SI, instead of the location of
  42.     the memory. To load the location, you can code "MOV SI,OFFSET VAR_ARRAY".
  43.  
  44. "m" means a memory variable or an indexed memory quantity; i.e., any Effective
  45.     Address EXCEPT a register.
  46.  
  47. "r" means the operand is a general-purpose register.  The 8 "rb" registers
  48.     are AL,BL,CL,DL,AH,BH,CH,DH; the 8 "rw" registers are AX,BX,CX,DX,SI,
  49.     DI,BP,SP.
  50.  
  51. WARNING: Instruction forms marked with "*" by the mnemonic are part of the
  52.     extended 186/286/NEC instruction set.  These instructions will NOT work
  53.     on the 8088 of the IBM-PC; nor will they work on the 8086.  If you wish
  54.     your programs to run on all PC's, do not use these instructions!
  55.  
  56. Opcodes    Instruction    Description
  57. -------    -----------    -----------
  58. 37         AAA            ASCII adjust AL (carry into AH) after addition
  59. D5 0A      AAD            ASCII adjust before division (AX = 10*AH + AL)
  60. D4 0A      AAM            ASCII adjust after multiply (AL/10: AH=Quo AL=Rem)
  61. 3F         AAS            ASCII adjust AL (borrow from AH) after subtraction
  62. 14 ib      ADC AL,ib      Add with carry immediate byte into AL
  63. 15 iw      ADC AX,iw      Add with carry immediate word into AX
  64. 80 /2 ib   ADC eb,ib      Add with carry immediate byte into EA byte
  65. 10 /r      ADC eb,rb      Add with carry byte register into EA byte
  66. 83 /2 ib   ADC ew,ib      Add with carry immediate byte into EA word
  67. 81 /2 iw   ADC ew,iw      Add with carry immediate word into EA word
  68. 11 /r      ADC ew,rw      Add with carry word register into EA word
  69. 12 /r      ADC rb,eb      Add with carry EA byte into byte register
  70. 13 /r      ADC rw,ew      Add with carry EA word into word register
  71. 04 ib      ADD AL,ib      Add immediate byte into AL
  72. 05 iw      ADD AX,iw      Add immediate word into AX
  73. 80 /0 ib   ADD eb,ib      Add immediate byte into EA byte
  74. 00 /r      ADD eb,rb      Add byte register into EA byte
  75. 83 /0 ib   ADD ew,ib      Add immediate byte into EA word
  76. 81 /0 iw   ADD ew,iw      Add immediate word into EA word
  77. 01 /r      ADD ew,rw      Add word register into EA word
  78. 02 /r      ADD rb,eb      Add EA byte into byte register
  79. 03 /r      ADD rw,ew      Add EA word into word register
  80. 24 ib      AND AL,ib      Logical-AND immediate byte into AL
  81. 25 iw      AND AX,iw      Logical-AND immediate word into AX
  82. 80 /4 ib   AND eb,ib      Logical-AND immediate byte into EA byte
  83. 20 /r      AND eb,rb      Logical-AND byte register into EA byte
  84. 81 /4 iw   AND ew,iw      Logical-AND immediate word into EA word
  85. 21 /r      AND ew,rw      Logical-AND word register into EA word
  86. 22 /r      AND rb,eb      Logical-AND EA byte into byte register
  87. 23 /r      AND rw,ew      Logical-AND EA word into word register
  88. 62 /r     *BOUND rw,md    INT 5 if rw not between [md] and [md+2] inclusive
  89. 9A cd      CALL cd        Call far segment, immediate 4-byte address
  90. E8 cw      CALL cw        Call near, offset relative to next instruction
  91. FF /3      CALL ed        Call far segment, address at EA doubleword
  92. FF /2      CALL ew        Call near, offset absolute at EA word
  93. 98         CBW            Convert byte into word (AH = top bit of AL)
  94. F8         CLC            Clear carry flag
  95. FC         CLD            Clear direction flag so SI and DI will increment
  96. FA         CLI            Clear interrupt enable flag; interrupts disabled
  97. F5         CMC            Complement carry flag
  98. 3C ib      CMP AL,ib      Subtract immediate byte from AL for flags only
  99. 3D iw      CMP AX,iw      Subtract immediate word from AX for flags only
  100. 80 /7 ib   CMP eb,ib      Subtract immediate byte from EA byte for flags only
  101. 38 /r      CMP eb,rb      Subtract byte register from EA byte for flags only
  102. 83 /7 ib   CMP ew,ib      Subtract immediate byte from EA word for flags only
  103. 81 /7 iw   CMP ew,iw      Subtract immediate word from EA word for flags only
  104. 39 /r      CMP ew,rw      Subtract word register from EA word for flags only
  105. 3A /r      CMP rb,eb      Subtract EA byte from byte register for flags only
  106. 3B /r      CMP rw,ew      Subtract EA word from word register for flags only
  107. A6         CMPS mb,mb     Compare bytes ES:[DI] from [SI], advance SI and DI
  108. A7         CMPS mw,mw     Compare words ES:[DI] from [SI], advance SI and DI
  109. A6         CMPSB          Compare bytes ES:[DI] from DS:[SI], advance SI and DI
  110. A7         CMPSW          Compare words ES:[DI] from DS:[SI], advance SI and DI
  111. 99         CWD            Convert word to doubleword (DX = top bit of AX)
  112.  
  113. 27         DAA            Decimal adjust AL after addition
  114. 2F         DAS            Decimal adjust AL after subtraction
  115. FE /1      DEC eb         Decrement EA byte by 1
  116. FF /1      DEC ew         Decrement EA word by 1
  117. 48+rw      DEC rw         Decrement word register by 1
  118. F6 /6      DIV eb         Unsigned divide AX by EA byte (AL=Quo AH=Rem)
  119. F7 /6      DIV ew         Unsigned divide DXAX by EA word (AX=Quo DX=Rem)
  120. C8 iw 00  *ENTER iw,0     Make stack frame, iw bytes local storage, 0 levels
  121. C8 iw 01  *ENTER iw,1     Make stack frame, iw bytes local storage, 1 level
  122. C8 iw ib  *ENTER iw,ib    Make stack frame, iw bytes local storage, ib levels
  123.            Fany           Floating point set is in FLOAT.DOC
  124. F4         HLT            Halt
  125. F6 /7      IDIV eb        Signed divide AX by EA byte (AL=Quo AH=Rem)
  126. F7 /7      IDIV ew        Signed divide DXAX by EA word (AX=Quo DX=Rem)
  127. F6 /5      IMUL eb        Signed multiply (AX = AL * EA byte)
  128. F7 /5      IMUL ew        Signed multiply (DXAX = AX * EA word)
  129. 6B /r ib  *IMUL rw,ib     Signed multiply immediate byte into word register
  130. 69 /r iw  *IMUL rw,iw     Signed multiply immediate word into word register
  131. 69 /r iw  *IMUL rw,ew,iw  Signed multiply (rw = EA word * immediate word)
  132. 6B /r ib  *IMUL rw,ew,ib  Signed multiply (rw = EA word * immediate byte)
  133. E4 ib      IN AL,ib       Input byte from immediate port into AL
  134. EC         IN AL,DX       Input byte from port DX into AL
  135. E5 ib      IN AX,ib       Input word from immediate port into AX
  136. ED         IN AX,DX       Input word from port DX into AX
  137. FE /0      INC eb         Increment EA byte by 1
  138. FF /0      INC ew         Increment EA word by 1
  139. 40+rw      INC rw         Increment word register by 1
  140. 6C        *INS eb,DX      Input byte from port DX into [DI]
  141. 6D        *INS ew,DX      Input word from port DX into [DI]
  142. 6C        *INSB           Input byte from port DX into ES:[DI]
  143. 6D        *INSW           Input word from port DX into ES:[DI]
  144. CC         INT 3          Interrupt 3 (trap to debugger) (far call, with flags
  145. CD ib      INT ib         Interrupt numbered by immediate byte     pushed first)
  146. CE         INTO           Interrupt 4 if overflow flag is 1
  147. CF         IRET           Interrupt return (far return and pop flags)
  148. 77 cb      JA cb          Jump short if above (CF=0 and ZF=0)    above=UNSIGNED
  149. 73 cb      JAE cb         Jump short if above or equal (CF=0)
  150. 72 cb      JB cb          Jump short if below (CF=1)             below=UNSIGNED
  151. 76 cb      JBE cb         Jump short if below or equal (CF=1 or ZF=1)
  152. 72 cb      JC cb          Jump short if carry (CF=1)
  153. E3 cb      JCXZ cb        Jump short if CX register is zero
  154. 74 cb      JE cb          Jump short if equal (ZF=1)
  155. 7F cb      JG cb          Jump short if greater (ZF=0 and SF=OF)  greater=SIGNED
  156. 7D cb      JGE cb         Jump short if greater or equal (SF=OF)
  157. 7C cb      JL cb          Jump short if less (SF/=OF)                less=SIGNED
  158. 7E cb      JLE cb         Jump short if less or equal (ZF=1 or SF/=OF)
  159. EB cb      JMP cb         Jump short (signed byte relative to next instruction)
  160. EA cd      JMP cd         Jump far (4-byte immediate address)
  161. E9 cw      JMP cw         Jump near (word offset relative to next instruction)
  162. FF /4      JMP ew         Jump near to EA word (absolute offset)
  163. FF /5      JMP md         Jump far (4-byte address in memory doubleword)
  164.  
  165. 76 cb      JNA cb         Jump short if not above (CF=1 or ZF=1)
  166. 72 cb      JNAE cb        Jump short if not above or equal (CF=1)
  167. 73 cb      JNB cb         Jump short if not below (CF=0)
  168. 77 cb      JNBE cb        Jump short if not below or equal (CF=0 and ZF=0)
  169. 73 cb      JNC cb         Jump short if not carry (CF=0)
  170. 75 cb      JNE cb         Jump short if not equal (ZF=0)
  171. 7E cb      JNG cb         Jump short if not greater (ZF=1 or SF/=OF)
  172. 7C cb      JNGE cb        Jump short if not greater or equal (SF/=OF)
  173. 7D cb      JNL cb         Jump short if not less (SF=OF)
  174. 7F cb      JNLE cb        Jump short if not less or equal (ZF=0 and SF=OF)
  175. 71 cb      JNO cb         Jump short if not overflow (OF=0)
  176. 7B cb      JNP cb         Jump short if not parity (PF=0)
  177. 79 cb      JNS cb         Jump short if not sign (SF=0)
  178. 75 cb      JNZ cb         Jump short if not zero (ZF=0)
  179. 70 cb      JO cb          Jump short if overflow (OF=1)
  180. 7A cb      JP cb          Jump short if parity (PF=1)
  181. 7A cb      JPE cb         Jump short if parity even (PF=1)
  182. 7B cb      JPO cb         Jump short if parity odd (PF=0)
  183. 78 cb      JS cb          Jump short if sign (SF=1)
  184. 74 cb      JZ cb          Jump short if zero (ZF=1)
  185. 9F         LAHF           Load: AH = flags  SF ZF xx AF xx PF xx CF
  186. C5 /r      LDS rw,ed      Load EA doubleword into DS and word register
  187. 8D /r      LEA rw,m       Calculate EA offset given by M, place in rw
  188. C9        *LEAVE          Set SP to BP, then POP BP (reverses previous ENTER)
  189. C4 /r      LES rw,ed      Load EA doubleword into ES and word register
  190. F0         LOCK (prefix)  Assert BUSLOCK signal for the next instruction
  191. AC         LODS mb        Load byte [SI] into AL, advance SI
  192. AD         LODS mw        Load byte [SI] into AL, advance SI
  193. AC         LODSB          Load byte [SI] into AL, advance SI
  194. AD         LODSW          Load byte [SI] into AL, advance SI
  195. E2 cb      LOOP cb        noflags DEC CX; jump short if CX/=0
  196. E1 cb      LOOPE cb       noflags DEC CX; jump short if CX/=0 and equal (ZF=1)
  197. E0 cb      LOOPNE cb      noflags DEC CX; jump short if CX/=0 and not equal
  198. E0 cb      LOOPNZ cb      noflags DEC CX; jump short if CX/=0 and ZF=0
  199. E1 cb      LOOPZ cb       noflags DEC CX; jump short if CX/=0 and zero (ZF=1)
  200. A0 iw      MOV AL,xb      Move byte variable (offset iw) into AL
  201. A1 iw      MOV AX,xw      Move word variable (offset iw) into AX
  202. 8E /3      MOV DS,mw      Move memory word into DS
  203. 8E /3      MOV DS,rw      Move word register into DS
  204. C6 /0 ib   MOV eb,ib      Move immediate byte into EA byte
  205. 88 /r      MOV eb,rb      Move byte register into EA byte
  206. 8E /0      MOV ES,mw      Move memory word into ES
  207. 8E /0      MOV ES,rw      Move word register into ES
  208. 8C /1      MOV ew,CS      Move CS into EA word
  209. 8C /3      MOV ew,DS      Move DS into EA word
  210. C7 /0 iw   MOV ew,iw      Move immediate word into EA word
  211. 8C /0      MOV ew,ES      Move ES into EA word
  212. 89 /r      MOV ew,rw      Move word register into EA word
  213. 8C /2      MOV ew,SS      Move SS into EA word
  214. B0+rb ib   MOV rb,ib      Move immediate byte into byte register
  215. 8A /r      MOV rb,eb      Move EA byte into byte register
  216. B8+rw iw   MOV rw,iw      Move immediate word into word register
  217. 8B /r      MOV rw,ew      Move EA word into word register
  218. 8E /2      MOV SS,mw      Move memory word into SS
  219. 8E /2      MOV SS,rw      Move word register into SS
  220. A2 iw      MOV xb,AL      Move AL into byte variable (offset iw)
  221. A3 iw      MOV xw,AX      Move AX into word register (offset iw)
  222.  
  223. A4         MOVS mb,mb     Move byte [SI] to ES:[DI], advance SI and DI
  224. A5         MOVS mw,mw     Move word [SI] to ES:[DI], advance SI and DI
  225. A4         MOVSB          Move byte DS:[SI] to ES:[DI], advance SI and DI
  226. A5         MOVSW          Move word DS:[SI] to ES:[DI], advance SI and DI
  227. F6 /4      MUL eb         Unsigned multiply (AX = AL * EA byte)
  228. F7 /4      MUL ew         Unsigned multiply (DXAX = AX * EA word)
  229. F6 /3      NEG eb         Two's complement negate EA byte
  230. F7 /3      NEG ew         Two's complement negate EA word
  231.            NIL (prefix)   Special "do-nothing" opcode assembles no code
  232. 90         NOP            No Operation
  233. F6 /2      NOT eb         Reverse each bit of EA byte
  234. F7 /2      NOT ew         Reverse each bit of EA word
  235. 0C ib      OR AL,ib       Logical-OR immediate byte into AL
  236. 0D iw      OR AX,iw       Logical-OR immediate word into AX
  237. 80 /1 ib   OR eb,ib       Logical-OR immediate byte into EA byte
  238. 08 /r      OR eb,rb       Logical-OR byte register into EA byte
  239. 81 /1 iw   OR ew,iw       Logical-OR immediate word into EA word
  240. 09 /r      OR ew,rw       Logical-OR word register into EA word
  241. 0A /r      OR rb,eb       Logical-OR EA byte into byte register
  242. 0B /r      OR rw,ew       Logical-OR EA word into word register
  243. E6 ib      OUT ib,AL      Output byte AL to immediate port number ib
  244. E7 ib      OUT ib,AX      Output word AX to immediate port number ib
  245. EE         OUT DX,AL      Output byte AL to port number DX
  246. EF         OUT DX,AX      Output word AX to port number DX
  247. 6E        *OUTS DX,eb     Output byte [SI] to port number DX, advance SI
  248. 6F        *OUTS DX,ew     Output word [SI] to port number DX, advance SI
  249. 6E        *OUTSB          Output byte DS:[SI] to port number DX, advance SI
  250. 6F        *OUTSW          Output word DS:[SI] to port number DX, advance SI
  251. 1F         POP DS         Set DS to top of stack, increment SP by 2
  252. 07         POP ES         Set ES to top of stack, increment SP by 2
  253. 8F /0      POP mw         Set memory word to top of stack, increment SP by 2
  254. 58+rw      POP rw         Set word register to top of stack, increment SP by 2
  255. 17         POP SS         Set SS to top of stack, increment SP by 2
  256. 61        *POPA           Pop DI,SI,BP,SP,BX,DX,CX,AX (SP value is ignored)
  257. 9D         POPF           Set flags register to top of stack, increment SP by 2
  258. 0E         PUSH CS        Set [SP-2] to CS, then decrement SP by 2
  259. 1E         PUSH DS        Set [SP-2] to DS, then decrement SP by 2
  260. 06         PUSH ES        Set [SP-2] to ES, then decrement SP by 2
  261. 6A ib     *PUSH ib        Push sign-extended immediate byte
  262. 68 iw     *PUSH iw        Set [SP-2] to immediate word, then decrement SP by 2
  263. FF /6      PUSH mw        Set [SP-2] to memory word, then decrement SP by 2
  264. 50+rw      PUSH rw        Set [SP-2] to word register, then decrement SP by 2
  265. 16         PUSH SS        Set [SP-2] to SS, then decrement SP by 2
  266. 60        *PUSHA          Push AX,CX,DX,BX,original SP,BP,SI,DI
  267. 9C         PUSHF          Set [SP-2] to flags register, then decrement SP by 2
  268. D0 /2      RCL eb,1       Rotate 9-bit quantity (CF, EA byte) left once
  269. D2 /2      RCL eb,CL      Rotate 9-bit quantity (CF, EA byte) left CL times
  270. C0 /2 ib  *RCL eb,ib      Rotate 9-bit quantity (CF, EA byte) left ib times
  271. D1 /2      RCL ew,1       Rotate 17-bit quantity (CF, EA word) left once
  272. D3 /2      RCL ew,CL      Rotate 17-bit quantity (CF, EA word) left CL times
  273. C1 /2 ib  *RCL ew,ib      Rotate 17-bit quantity (CF, EA word) left ib times
  274. D0 /3      RCR eb,1       Rotate 9-bit quantity (CF, EA byte) right once
  275. D2 /3      RCR eb,CL      Rotate 9-bit quantity (CF, EA byte) right CL times
  276. C0 /3 ib  *RCR eb,ib      Rotate 9-bit quantity (CF, EA byte) right ib times
  277. D1 /3      RCR ew,1       Rotate 17-bit quantity (CF, EA word) right once
  278. D3 /3      RCR ew,CL      Rotate 17-bit quantity (CF, EA word) right CL times
  279. C1 /3 ib  *RCR ew,ib      Rotate 17-bit quantity (CF, EA word) right ib times
  280.  
  281. F3         REP (prefix)   Repeat following MOVS,LODS,STOS,INS, or OUTS CX times
  282. F3         REPE (prefix)  Repeat following CMPS or SCAS CX times or until ZF=0
  283. F2         REPNE (prefix) Repeat following CMPS or SCAS CX times or until ZF=1
  284. F2         REPNZ (prefix) Repeat following CMPS or SCAS CX times or until ZF=0
  285. F3         REPZ (prefix)  Repeat following CMPS or SCAS CX times or until ZF=1
  286. CB         RETF           Return to far caller
  287. C3         RET            Return to near caller
  288. CA iw      RETF iw        RET (far), pop iw bytes
  289. C2 iw      RET iw         RET (near), pop iw bytes pushed before Call
  290. D0 /0      ROL eb,1       Rotate 8-bit EA byte left once
  291. D2 /0      ROL eb,CL      Rotate 8-bit EA byte left CL times
  292. C0 /0 ib  *ROL eb,ib      Rotate 8-bit EA byte left ib times
  293. D1 /0      ROL ew,1       Rotate 16-bit EA word left once
  294. D3 /0      ROL ew,CL      Rotate 16-bit EA word left CL times
  295. C1 /0 ib  *ROL ew,ib      Rotate 16-bit EA word left ib times
  296. D0 /1      ROR eb,1       Rotate 8-bit EA byte right once
  297. D2 /1      ROR eb,CL      Rotate 8-bit EA byte right CL times
  298. C0 /1 ib  *ROR eb,ib      Rotate 8-bit EA byte right ib times
  299. D1 /1      ROR ew,1       Rotate 16-bit EA word right once
  300. D3 /1      ROR ew,CL      Rotate 16-bit EA word right CL times
  301. C1 /1 ib  *ROR ew,ib      Rotate 16-bit EA word right ib times
  302. 9E         SAHF           Store AH into flags  SF ZF xx AF xx PF xx CF
  303. D0 /4      SAL eb,1       Multiply EA byte by 2, once
  304. D2 /4      SAL eb,CL      Multiply EA byte by 2, CL times
  305. C0 /4 ib  *SAL eb,ib      Multiply EA byte by 2, ib times
  306. D1 /4      SAL ew,1       Multiply EA word by 2, once
  307. D3 /4      SAL ew,CL      Multiply EA word by 2, CL times
  308. C1 /4 ib  *SAL ew,ib      Multiply EA word by 2, ib times
  309. D0 /7      SAR eb,1       Signed divide EA byte by 2, once
  310. D2 /7      SAR eb,CL      Signed divide EA byte by 2, CL times
  311. C0 /7 ib  *SAR eb,ib      Signed divide EA byte by 2, ib times
  312. D1 /7      SAR ew,1       Signed divide EA word by 2, once
  313. D3 /7      SAR ew,CL      Signed divide EA word by 2, CL times
  314. C1 /7 ib  *SAR ew,ib      Signed divide EA word by 2, ib times
  315. 1C ib      SBB AL,ib      Subtract with borrow immediate byte from AL
  316. 1D iw      SBB AX,iw      Subtract with borrow immediate word from AX
  317. 80 /3 ib   SBB eb,ib      Subtract with borrow immediate byte from EA byte
  318. 18 /r      SBB eb,rb      Subtract with borrow byte register from EA byte
  319. 83 /3 ib   SBB ew,ib      Subtract with borrow immediate byte from EA word
  320. 81 /3 iw   SBB ew,iw      Subtract with borrow immediate word from EA word
  321. 19 /r      SBB ew,rw      Subtract with borrow word register from EA word
  322. 1A /r      SBB rb,eb      Subtract with borrow EA byte from byte register
  323. 1B /r      SBB rw,ew      Subtract with borrow EA word from word register
  324. AE         SCAS mb        Compare bytes [DI] - AL, advance DI
  325. AF         SCAS mw        Compare words [DI] - AX, advance DI
  326. AE         SCASB          Compare bytes ES:[DI] - AL, advance DI
  327. AF         SCASW          Compare words ES:[DI] - AX, advance DI
  328.  
  329. D0 /4      SHL eb,1       Multiply EA byte by 2, once
  330. D2 /4      SHL eb,CL      Multiply EA byte by 2, CL times
  331. C0 /4 ib  *SHL eb,ib      Multiply EA byte by 2, ib times
  332. D1 /4      SHL ew,1       Multiply EA word by 2, once
  333. D3 /4      SHL ew,CL      Multiply EA word by 2, CL times
  334. C1 /4 ib  *SHL ew,ib      Multiply EA word by 2, ib times
  335. D0 /5      SHR eb,1       Unsigned divide EA byte by 2, once
  336. D2 /5      SHR eb,CL      Unsigned divide EA byte by 2, CL times
  337. C0 /5 ib  *SHR eb,ib      Unsigned divide EA byte by 2, ib times
  338. D1 /5      SHR ew,1       Unsigned divide EA word by 2, once
  339. D3 /5      SHR ew,CL      Unsigned divide EA word by 2, CL times
  340. C1 /5 ib  *SHR ew,ib      Unsigned divide EA word by 2, ib times
  341. F9         STC            Set carry flag
  342. FD         STD            Set direction flag so SI and DI will decrement
  343. FB         STI            Set interrupt enable flag, interrupts enabled
  344. AA         STOS mb        Store AL to byte [DI], advance DI
  345. AB         STOS mw        Store AX to word [DI], advance DI
  346. AA         STOSB          Store AL to byte ES:[DI], advance DI
  347. AB         STOSW          Store AX to word ES:[DI], advance DI
  348. 2C ib      SUB AL,ib      Subtract immediate byte from AL
  349. 2D iw      SUB AX,iw      Subtract immediate word from AX
  350. 80 /5 ib   SUB eb,ib      Subtract immediate byte from EA byte
  351. 28 /r      SUB eb,rb      Subtract byte register from EA byte
  352. 83 /5 ib   SUB ew,ib      Subtract immediate byte from EA word
  353. 81 /5 iw   SUB ew,iw      Subtract immediate word from EA word
  354. 29 /r      SUB ew,rw      Subtract word register from EA word
  355. 2A /r      SUB rb,eb      Subtract EA byte from byte register
  356. 2B /r      SUB rw,ew      Subtract EA word from word register
  357. A8 ib      TEST AL,ib     AND immediate byte into AL for flags only
  358. A9 iw      TEST AX,iw     AND immediate word into AX for flags only
  359. F6 /0 ib   TEST eb,ib     AND immediate byte into EA byte for flags only
  360. 84 /r      TEST eb,rb     AND byte register into EA byte for flags only
  361. F7 /0 iw   TEST ew,iw     AND immediate word into EA word for flags only
  362. 85 /r      TEST ew,rw     AND word register into EA word for flags only
  363. 84 /r      TEST rb,eb     AND EA byte into byte register for flags only
  364. 85 /r      TEST rw,ew     AND EA word into word register for flags only
  365. 9B         WAIT           Wait until BUSY pin is inactive (HIGH)
  366. 9r         XCHG AX,rw     Exchange word register with AX
  367. 86 /r      XCHG eb,rb     Exchange byte register with EA byte
  368. 87 /r      XCHG ew,rw     Exchange word register with EA word
  369. 86 /r      XCHG rb,eb     Exchange EA byte with byte register
  370. 9r         XCHG rw,AX     Exchange  with word register
  371. 87 /r      XCHG rw,ew     Exchange EA word with word register
  372. D7         XLAT mb        Set AL to memory byte [BX + unsigned AL]
  373. D7         XLATB          Set AL to memory byte DS:[BX + unsigned AL]
  374. 34 ib      XOR AL,ib      Exclusive-OR immediate byte into AL
  375. 35 iw      XOR AX,iw      Exclusive-OR immediate word into AX
  376. 80 /6 ib   XOR eb,ib      Exclusive-OR immediate byte into EA byte
  377. 30 /r      XOR eb,rb      Exclusive-OR byte register into EA byte
  378. 81 /6 iw   XOR ew,iw      Exclusive-OR immediate word into EA word
  379. 31 /r      XOR ew,rw      Exclusive-OR word register into EA word
  380. 32 /r      XOR rb,eb      Exclusive-OR EA byte into byte register
  381. 33 /r      XOR rw,ew      Exclusive-OR EA word into word register
  382.  
  383. * Starred forms will not execute on 8086/8088!  See note at top of chart.
  384.  
  385.